package main

var t Temper

// last temperature and last kick timestamp
type ctpt struct {
	tp int64
	kt int64
}

type Temper struct {
	viewTemper  map[string]*ctpt
	clickTemper map[string]*ctpt
}

func Init() {
	t.viewTemper = make(map[string]*ctpt)
	t.clickTemper = make(map[string]*ctpt)
}
func IsViewHot(ele string, ts int64) bool {
	if v, ok := t.viewTemper[ele]; ok == true {
        v.ct += 
	}
	// t.viewTemper[ele] = ts
	return false
}
func IsClickHot(ele string, ts int64) bool {
	if v, ok := t.clickTemper[ele]; ok == true {
		if ts-v < 1200000 {
			t.clickTemper[ele] = ts
			return true
		}
	}
	t.clickTemper[ele] = ts
	return false
}

func main() {
	Init()

}
